package com.hainatong.shiphelper.module.workermgr.adapter;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.viewholder.BaseDataBindingHolder;
import com.hainatong.shiphelper.R;
import com.hainatong.shiphelper.databinding.ItemDepartmentViewBinding;
import com.hainatong.shiphelper.module.workermgr.entity.DepartmentBean;
import org.jetbrains.annotations.NotNull;

public class DepartmentAdapter extends BaseQuickAdapter<DepartmentBean, BaseDataBindingHolder<ItemDepartmentViewBinding>>
{
    public DepartmentAdapter()
    {
        super(R.layout.item_department_view);
    }

    @Override
    protected void convert(@NotNull BaseDataBindingHolder<ItemDepartmentViewBinding> bindingHolder, DepartmentBean departmentBean)
    {
        ItemDepartmentViewBinding binding = bindingHolder.getDataBinding();
        if( binding != null )
        {
            //binding.setDepartment( departmentBean );
            binding.executePendingBindings();
        }
    }
}
